Skip to content

Conversation

@devversion
Copy link
Member

No description provided.

For linking of Angular packages we are using something more clever than
what we are doing with `rules_nodejs`. Instead of maintaing complexity
where we pre-link FESM bundles and somehow inject them into other Bazel
bundling steps (with complex linker mappings), we pre-link as part of
individual package postinstall steps, exposing the linked bundles via a
NodeJS exports condition.

This is possible vis this package/script:
https://github.com/devversion/angular-linking

Clearly this is not at a good location, but it's necessary right now to
ship this code via npm because `rules_js` struggles to use pnpm
extensions onto workspace 1st-party packages. Long-term we can either
decide to keep it that way, move it into e.g. dev-infra repository, or
we can explore shipping pre-linked bundles via APF. TBD.
Migrates all `ts_library` targets in `tools/` to use the `rules_js`
`ts_project` rule.
Improves the `ts_project` interop to work with Esbuild bundling. Right
now we can end up with multiple copies of the same source file.

e.g. input might import from `@angular/cdk/testing` and end up with
the version of `rules_nodejs` linker, while other imports to the native
`ts_library` targets end up being mapped to their actual sources in the
`bazel-bin`, and not inside `node_modules`
Migrates more `ts_library` targets to `rules_js`
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Mar 19, 2025
@devversion devversion marked this pull request as ready for review March 19, 2025 16:47
@devversion devversion requested review from a team as code owners March 19, 2025 16:47
@devversion devversion requested review from crisbeto and mmalerba and removed request for a team March 19, 2025 16:47
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Mar 19, 2025
@devversion devversion merged commit f1ed784 into angular:19.2.x Mar 19, 2025
22 of 23 checks passed
@devversion devversion deleted the rjs-2-patch branch March 19, 2025 17:35
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants